package top.zhongyy.pojo;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author Andy
 * @since 2021-03-25
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName(value = "t_blog")
@ApiModel(value = "Blog对象", description = "")
public class Blog implements Serializable {
    
    private static final long serialVersionUID = 1L;
    
    @ApiModelProperty(value = "博客id")
    @TableId(value = "id", type = IdType.ID_WORKER)
    private Long id;
    
    @ApiModelProperty(value = "赞赏开关")
    private boolean appreciation;
    
    @ApiModelProperty(value = "评论开关")
    private boolean commentSwitch;
    
    @ApiModelProperty(value = "博客内容")
    private String content;
    
    @ApiModelProperty(value = "首图")
    private String firstPicture;
    
    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    
    @ApiModelProperty(value = "标志:原创,转载,翻译")
    private String flag;
    
    @ApiModelProperty(value = "1:发布，0:草稿")
    private boolean published;
    
    @ApiModelProperty(value = "是否推荐")
    private boolean recommend;
    
    @ApiModelProperty(value = "是否开启版权")
    private boolean shareStatement;
    
    @ApiModelProperty(value = "标题")
    private String title;
    
    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.UPDATE)
    private Date updateTime;
    
    @ApiModelProperty(value = "浏览次数")
    private int views;
    
    @ApiModelProperty(value = "分类id")
    private Long typeId;
    
    @ApiModelProperty(value = "用户id")
    private Long userId;
    
    @ApiModelProperty(value = "描述")
    private String description;
    
    @ApiModelProperty(value = "标签id")
    @TableField("tagIds")
    private String tagIds;
    
    @ApiModelProperty(value = "逻辑删除")
    @TableLogic
    private int deleted;
    
    @ApiModelProperty(value = "点赞数量")
    private int praise;
    
    @ApiModelProperty(value = "点踩数量")
    private int yuck;
    
    @TableField(exist = false)
    @ApiModelProperty(value = "所属分类对象")
    private Type type;
    
    @TableField(exist = false)
    @ApiModelProperty(value = "博客所有标签")
    private List<Tag> tags;
    
    @TableField(exist = false)
    @ApiModelProperty(value = "帖子对应的用户")
    private User user;
    
    
}
